<?php
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='left' width='450'>";
}	
if ($intCustomerID){ 
    include (MODULE . "/action/qrySelectCustomer");

echo "
	
	<tr align='left'  valign='top'>
         <td align='left' colspan='2'>
             <h2>"
			 	.DisplayLookupValue("tblTitle","Title",$myrow[Title])
				."&nbsp;".$myrow[FirstName]."&nbsp;".$myrow[Surname]."&nbsp
			 </h2>

		 </td>
     </tr>

";


echo "
     <tr>
         <td align='left'>
             <!-- <b>Address Line 1 : </b> -->
			 <b>Contact Details :</b>
         </td>
         <td align='left'>
             ".$myrow[Address1]."<br/>
";

	if($myrow[Address2]){
		echo $myrow[Address2]."<br/>	";
	}

echo "
             ".$myrow[City]."<br/>
             ".$myrow[Region]."<br/>
             ".$myrow[PostalCode]."<br/>
             ".DisplayLookupValue("tblCountry","Country",$myrow[Country])."<br/>
         </td>
     </tr>
	 
	 <tr>
	 	<td colspan='2'><img src='./images".SITE_SUFFIX."/space.gif' height='5' border='0' alt=''></td>
	 </tr>
";

echo "
     <tr>
         <td align='left'>
             <!-- <b>Phone Number : </b> -->
			 &nbsp;
         </td>
         <td align='left'>
             <b>T:</b>&nbsp;".$myrow[Phone]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
	if($myrow[Fax]){
		echo "
		     <tr>
		         <td align='left'>
		             <!-- <b>Mobile Number : </b> -->&nbsp;
		         </td>
		         <td align='left'>
		             <b>M:</b>&nbsp;".$myrow[Fax]."
		         </td>
		     </tr>
		";
	}
	
	if($myrow[Actual_FAX]){
		echo "
		     <tr>
		         <td align='left'>
		             <!-- <b>Fax Number : </b> -->&nbsp;
		         </td>
		         <td align='left'>
		             <b>F:</b>&nbsp;".$myrow[Actual_FAX]."
		         </td>
		     </tr>
		";
	}

echo "
	 <tr>
	 	<td colspan='2'><img src='./images".SITE_SUFFIX."/space.gif' height='5' border='0' alt=''></td>
	 </tr>
";
	if($myrow[Email]){
		echo "
		     <tr>
		         <td align='left'>
		             <!-- <b>Email Address: : </b> -->
					 &nbsp;
		         </td>
		         <td align='left'>
				 	<a href='".ScreenURL("EmailCustomer",array('intCustomerID'=>$myrow[ID]))."' target='_blank'>".$myrow[Email]."</a>
		         </td>
		     </tr>
		";
	}
	
 

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Registration Date : </b>
         </td>
         <td align='left'>
             ".$myrow[RegistrationDate]."
         </td>
     </tr>
";

    //LONG
echo "
     <tr align='left'>
         <td align='left'>
             <b>Referrer : </b>
             
         </td>
         <td align='left'>
            <a href=\"JavaScript: newWindow = openWin( '" . ScreenURL("DisplayReferrer",array('intReferrerID'=>$myrow[Referrer])) . "', 'DisplayReferrer', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus()\">
             ".DisplayLookupValue("tblReferrer","Referrer",$myrow[Referrer])."
            </a>
         </td>
     </tr>
";
echo "
     <tr>
         <td align='left'>
             <b>Last Login Date : </b>
         </td>
         <td align='left'>
             ".$myrow[LoginDate]."
         </td>
     </tr>
";

echo "
	<tr>
		<td colspan='2'>
			<table  width='450' cellpadding='0' cellspacing='0' border='0' bordercolor='Fuchsia' class='Normal' align='center'>
";
				// Set intCustomerNoteID to null so when display after adding/entering note all are diplayed
				$intCustomerNotesID = "";
				include( MODULE . "/screen/DisplayCustomerNotes");
	
echo "
			</table>
		</td>
    </tr>";
}else{
echo "
    <tr>
         <td align='center'>
              No Customer selected.
         </td>
    </tr>
";
}
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
